<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>




<c:if test="${requestScope.list==null }">
					<c:redirect url="Cardpaging"></c:redirect>
					</c:if>

<table>

<tr>

<td>card id</td>

<td>card name</td>
<td>action</td>
</tr>

<c:forEach items="${requestScope.list}" var ="rows"> 
<tr>

<td>${rows.id}</td>

<td>${rows.name}</td>

<c:url var="delete" value="Cardcontroller">
                          <c:param name="btaction" value="delete"/>
                          <c:param name="id" value="${rows.id}"/>
              </c:url>

<td>

<a href="Cardedit?id=${rows.id }"><img src="${pageContext.request.contextPath}/Manager/images/ico_edit_16.png" class="icon16 fl-space2" alt="" title="edit" /></a>
	<a href="${delete}">
	<img src="${pageContext.request.contextPath}/Manager/images/ico_delete_16.png" class="icon16 fl-space2" alt="" title="delete" />
	</a>

</td>

</tr>
</c:forEach>
</table>


	<!--  PHAN TRANG -->
						
			<div style=" float: left; width: 100px;">
                  
                  <c:if test="${currentPage != 1}">
               		<a href="Cardpaging?page=1" style="float: left; width: 30px; ">
					<img src="${pageContext.request.contextPath}/Manager/images/backall.png" border="0">
					</a>
               		<a href="Cardpaging?page=${currentPage - 1}" class="page-left"><img src="${pageContext.request.contextPath}/Manager/images/back1.png" border="0"></a>
        		   </c:if>
        		   
        		   <c:forEach begin="1" end="${noOfPages}" var="i">
                <c:choose>
                    <c:when test="${currentPage eq i}">
                    <div id="page-info"> Page <a> <strong>${i}</strong></a> / ${noOfPages} </div>
                    </c:when> 
                </c:choose>
            </c:forEach>   
                      <c:if test="${currentPage lt noOfPages}">
                			<a href="Cardpaging?page=${currentPage + 1}" class="page-right">
								<img src="${pageContext.request.contextPath}/Manager/images/next1.png" border="0">
							</a>
							<a href="Cardpaging?page=${noOfPages}" class="page-far-right">
							<img src="${pageContext.request.contextPath}/Manager/images/nextall.png" border="0">
							</a>
           			</c:if>  
           		</div>
              
              <!-- het PHAN TRANG -->


</body>
</html>